package com.hdoit.jiayuntong.camera;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;

public class ReceiveBroadcast extends BroadcastReceiver {

	@Override
	public void onReceive(Context context, Intent intent) {
		String action = intent.getStringExtra("flag");
		if("update".equals(action)){
			if(context instanceof PictureGridActivity){
				((PictureGridActivity)context).getAdapter().notifyDataSetChanged();
			}
		} else if("finish".equals(action)) {
			context.stopService(new Intent(context,DataHandlerService.class));
		}
	}
}
